Splunk MINT SDK for Android (Legacy)

Splunk MINT SDK for Android Developer Guide

Splunk MINT is no longer available for purchase as of January 29, 2021. Customers who have already been paying to ingest and process MINT data in Splunk Enterprise will continue to receive support until December 31, 2021, which is End of Life for all MINT products: App, Web Service (Management Console), SDK and Add-On.

Add breadcrumbs to crash reports

To help investigate the cause of a crash, you can have Splunk MINT report the flow of events a user experienced leading up to the crash. When you know this sequence of things the user did with your app before it crashed, you are better equipped to reproduce the crash and diagnose the problem. To tag the events or actions in your app, add breadcrumbs to your code. Splunk MINT retains data associated with a maximum of 16 breadcrumbs prior to a crash.

Use the leaveBreadcrumb(breadcrumb) method at the points of interest in your code as follows:

Mint.leaveBreadcrumb("keyPressed");
Mint.leaveBreadcrumb("loginDone");

To view breadcrumbs in a crash report, click an error on the Errors dashboard in Splunk MINT Management Console, and then click Breadcrumbs in the error detail area.

Example code

public MyActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: Update with your API key
        Mint.initAndStartSession(this.getApplication(), "YOUR_API_KEY");
        Mint.leaveBreadcrumb("login activity onCreate");
    }
    public void onResume() {
        super.onResume();
        Mint.leaveBreadcrumb("login activity onResume");
    }
    public void logginPressed(View view) {
        Mint.leaveBreadcrumb("login activity logginPressed");
        new LoginAsyncTask.execute();
    }
    public void onLoginTaskResult(String result) {
        Mint.leaveBreadcrumb("login activity result: " + result);
    }
    public void onStop() {
        super.onStop();
        Mint.leaveBreadcrumb("login activity onStop");
        Mint.closeSession(this.getApplication());
    }
}
Last modified on 28 January, 2019
Add custom data to crash reports   Track activity

This documentation applies to the following versions of Splunk MINT SDK for Android (Legacy): 5.2.x


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters